﻿using System;
using System.Reflection;

namespace IInject.Registration.Scanning
{
	public interface IAssemblyScanner
	{
        /// <summary>
        /// Adds the provided <see cref="IScanningRule"/> to the
        /// conventions used througout the lifetime of this instance.
        /// </summary>
        /// <param name="convention">The <see cref="IScanningRule"/> to add.</param>
        void Add(IScanningRule convention);
        /// <summary>
        /// Clears the current convention list and adds
        /// the provided <see cref="IScanningRule"/>s to the
        /// conventions used througout the lifetime of this instance.
        /// </summary>
        /// <param name="conventions">The <see cref="IScanningRule"/>s to add.</param>
		void Using(params IScanningRule[] conventions);

        /// <summary>
        /// Scans the calling assembly.
        /// </summary>
		void ScanCallingAssembly();
        /// <summary>
        /// Scans the executing assembly.
        /// </summary>
		void ScanExecutingAssembly();

        /// <summary>
        /// Loads and scans the assembly with the provided name.
        /// </summary>
        /// <param name="assemblyName">The name of the assembly to scan.</param>
        void Scan(string assemblyName);
        /// <summary>
        /// Loads and scans the assembly with the provided <see cref="AssemblyName"/>.
        /// </summary>
        /// <param name="assemblyName">The <see cref="AssemblyName"/> of the assembly to scan.</param>
		void Scan(AssemblyName assemblyName);
        /// <summary>
        /// Scans the provided <see cref="Assembly"/>.
        /// </summary>
        /// <param name="assembly">The <see cref="Assembly"/> to scan.</param>
		void Scan(Assembly assembly);
	}
}
